<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>订单</title>
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <link rel="stylesheet" type="text/css" href="{{ asset('index/static/css/main.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ asset('index/layui/css/layui.css') }}">
    <script type="text/javascript" src="{{ asset('index/layui/layui.js') }} "></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
</head>
<body>




<div class="header">
    <div class="headerLayout w1200">
        <div class="headerCon">

            <h1 class="mallLogo">
                <a href="#" title="母婴商城">
                    <img src="/index/static/img/logo.png">
                </a>
            </h1>
            <div class="mallSearch">
                <form action="" class="layui-form" novalidate>
                    <input type="text" name="title" required  lay-verify="required" autocomplete="off" class="layui-input" placeholder="请输入需要的商品">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">
                        <i class="layui-icon layui-icon-search"></i>
                    </button>
                    <input type="hidden" name="" value="">
                </form>
            </div>
        </div>
    </div>
</div>


<div class="content content-nav-base shopcart-content">
    <div class="main-nav">
        <div class="inner-cont0">
            <div class="inner-cont1 w1200">
                <div class="inner-cont2">
                    <a href="commodity.html" class="active">所有商品</a>
                    <a href="buytoday.html">今日团购</a>
                    <a href="information.html">母婴资讯</a>
                    <a href="about.html">关于我们</a>
                </div>
            </div>
        </div>
    </div>
    <div class="banner-bg w1200">
        <h3>夏季清仓</h3>
        <p>宝宝被子、宝宝衣服3折起</p>
    </div>
    <div class="cart w1200">
        <div style="float: left;width: 15%;">
            <a class="layui-btn layui-btn-primary" style="width:120px;margin: 5px" href="/user">个人中心</a>
            <a class="layui-btn layui-btn-primary" style="width:120px;margin: 5px" href="/cart">购 物 车</a>
            <a class="layui-btn layui-btn-primary" style="width:120px;margin: 5px" href="/cart">订    单</a>
            <a class="layui-btn layui-btn-primary" style="width:120px;margin: 5px" href="/logout">退    出</a>
        </div>
        <div style="float: right;width: 85%;margin-top: 5px">
        <div class="cart-table-th">
            <div class="th th-item">
                <div class="th-inner">
                </div>
            </div>
            <div class="th th-item">
                <div class="th-inner">
                    商品
                </div>
            </div>
            <div class="th th-price">
                <div class="th-inner">
                    单价
                </div>
            </div>
            <div class="th th-amount">
                <div class="th-inner">
                    数量
                </div>
            </div>
            <div class="th th-sum">
                <div class="th-inner">
                    小计
                </div>
            </div>
        </div>
        <div class="OrderList">
            <div class="order-content" id="list-cont">

                @foreach ($goods['order_goods'] as $good)
                <ul class="item-content layui-clear">

                    <li class="th th-item">
                        <div class="item-cont">
                            <a href="javascript:;"><img src="/{{$good['image']}}" alt=""></a>
                            <div class="text">
                                <div class="title">{{$good['name']}}</div>
                                <p>
                                    <span>{{$good['sku']}}</span>
                                </p>
                            </div>
                        </div>
                    </li>
                    <li class="th th-price">
                        <div class="item-cont">
                        <span class="th-su">{{$good['price']}}</span>
                        </div>
                    </li>
                    <li class="th th-amount">
                        <div class="box-btn layui-clear">
                            <span class="th-su">{{$good['num']}}</span>
                        </div>
                    </li>
                    <li class="th th-sum">
                        <span class="sum">{{$good['price'] * $good['num']}}</span>
                    </li>

                </ul>
                @endforeach
            </div>
        </div>

        <div class="FloatBarHolder layui-clear">
            <div class="th th-chk">
                <div class="select-all">
                    <label>&nbsp;&nbsp;共<span class="Selected-pieces">{{$goods['num']}}</span>件</label>

                </div>
            </div>
            <div class="th Settlement">
                <button class="layui-btn">支付</button>
            </div>
            <div class="th total">
                <p>应付：<span class="pieces-total">{{$goods['price_all']}}</span></p>

            </div>

        </div>
            <div class="FloatBarHolder">
            <div class="th total" style="margin: 20px 0">
                <p>收货地址：<span class="pieces-total">安徽省合肥市政务区***街道888号</span></p>
            </div>
            </div>
        </div>
        <div style="clear: both!important;"></div>
    </div>
</div>

<script type="text/javascript">
    layui.config({
        base: '/index/static/js/util/' //你存放新模块的目录，注意，不是layui的模块目录
    }).use(['mm','jquery','element','car1'],function(){
        var mm = layui.mm,$ = layui.$,element = layui.element,car1 = layui.car1;

        // 模版导入数据
        // var html = demo.innerHTML,
        // listCont = document.getElementById('list-cont');
        // mm.request({
        //   url: '../json/shopcart.json',
        //   success : function(res){
        //     listCont.innerHTML = mm.renderHtml(html,res)
        //     element.render();
        //     car.init()
        //   },
        //   error: function(res){
        //     console.log(res);
        //   }
        // })
        //
        car1.init()


    });
</script>
</body>
</html>